feat: added realtime client side validation on checkout form inputs#27
Open
Ankesh2004 wants to merge 1 commit intojuspay:mainfrom
Open
feat: added realtime client side validation on checkout form inputs#27Ankesh2004 wants to merge 1 commit intojuspay:mainfrom
Ankesh2004 wants to merge 1 commit intojuspay:mainfrom
Conversation
|
Hey @Ankesh2004 can you please add a screen recording of how validations will work covering all edge cases along with the screenshot you have provided. |
|
Hey @Ankesh2004 Any updates. |
| ); | ||
| } | ||
| } | ||
| add_action('wp_enqueue_scripts', 'enqueue_checkout_validation_script'); |
Contributor
There was a problem hiding this comment.
Suggested change
| add_action('wp_enqueue_scripts', 'enqueue_checkout_validation_script'); | |
| add_action( 'wp_enqueue_scripts', 'enqueue_checkout_validation_script' ); |
| console.error('Place Order button not found'); | ||
| return; | ||
| } | ||
| console.log('Place Order button found'); |
Contributor
There was a problem hiding this comment.
Suggested change
| console.log('Place Order button found'); |
Comment on lines
+5
to
+14
| if (!form) { | ||
| console.error('Checkout form not found'); | ||
| return; | ||
| } | ||
| console.log('Checkout form found'); | ||
|
|
||
| if (!placeOrderButton) { | ||
| console.error('Place Order button not found'); | ||
| return; | ||
| } |
Contributor
There was a problem hiding this comment.
Suggested change
| if (!form) { | |
| console.error('Checkout form not found'); | |
| return; | |
| } | |
| console.log('Checkout form found'); | |
| if (!placeOrderButton) { | |
| console.error('Place Order button not found'); | |
| return; | |
| } |
Comment on lines
+26
to
+29
| if (!emailField || !firstNameField || !lastNameField || !zipCodeField || !phoneField) { | ||
| console.error('One or more form fields not found'); | ||
| return; | ||
| } |
Contributor
There was a problem hiding this comment.
Suggested change
| if (!emailField || !firstNameField || !lastNameField || !zipCodeField || !phoneField) { | |
| console.error('One or more form fields not found'); | |
| return; | |
| } |
Contributor
|
This is good work |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type of Change
Description
Adds realtime input validations on checkout page.
Additional Changes
checkout-validation.jsin js folder.hyperswitch-checkout.phpMotivation and Context
Fixes issue juspay/hyperswitch#6169
How did you test it?
Locally tested
